package day04;

import java.util.Arrays;

public class Bubble {
    public static void main(String[] args) {
        int a[] = new int [10];
        for (int i = 0; i <a.length ; i++) {
            a[i]= (int) (100* Math.random());
        }
        System.out.println(Arrays.toString(a));
        for (int i = 0; i <a.length-1; i++) {
            for (int j = 0; j <a.length-1-i; j++) {
                int b;
                if (a[j]>a[j+1]){
                    b=a[j];
                    a[j]= a[j+1];
                    a[j+1]=b;
                }

            }
        }
        System.out.println(Arrays.toString(a));
    }
}
